<template>
	<view>
		<view>标题：{{title}}</view>
		<input type="text" v-model="title">
		----------------
		<view class="out">
			<view class="row">
				<input class="border" type="text" placeholder="请输入姓名" v-model="message.username">
			</view>
			<view class="row">
				<input class="border" type="text" placeholder="请输入电话" v-model="message.tel">
			</view>
			<view class="row">
				<textarea class="border" name="" id="" cols="30" rows="10" placeholder="请输入留言内容" v-model="message.content"></textarea>
			</view>
			<view class="row">
				<button type="primary" @click="onclick">提交留言</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:"v-model",
				message:{
					username:"",
					tel:"",
					content:""
				}
			};
		},
		methods:{
			onclick(){
				console.log(this.message)
			}
		}
	}
</script>

<style lang="scss">
	.out{
		padding: 30rpx;
		.row{
			margin-bottom: 10rpx;
		}
		.border{
			border: 1px solid #eee;
			width: 100%;
			padding: 10rpx;
			box-sizing: border-box;
		}
	}
</style>
